package cn.us.eagle.generic.service;

import java.util.List;

/**
 * 继承式泛型Service接口类
 * 
 * @author ReasonZhong
 * 
 * @param <T>
 *            泛型类
 * @param <PK>
 *            泛型类主键
 */
public interface BaseService<T, PK extends java.io.Serializable> {

	public PK save(T model);

	public void saveOrUpdate(T model);

	public void update(T model);

	public void merge(T model);

	public void delete(PK id);

	public void deleteObject(T model);

	public T get(PK id);

	public int countAll();

	public List<T> listAll();

	boolean isExists(PK id);

	public void flush();

	public void clear();
}
